﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>数据上报任务详情</title>
<#include "/common/resource.ftl">
<style>
.info-table{width:100%;}
.info-table .info-lable{text-align: right;white-space: nowrap;font-weight: normal;width: 90px;padding:10px;padding-right: 10px;background: #fafafa;border-right: 1px solid #eee;border-bottom: 1px solid #eee;}
.info-table .info-value{width: auto;padding: 10px;border-bottom: 1px solid #eee;}
</style>
<script type="text/javascript">
$(document).ready(function(){
	<#if params.id??>
	$.ajax({
        type: "GET",
        url: "${params.contextPath}/web/task/getById.json?id=${params.id}",
        dataType: "json",
        success: function(resp){
        	data = resp.data;
        	for(var key in data){
        		$("#"+key).html(data[key]);
        	}
        	var actorList = data.actorList;
        	var nameList = [];
        	$(actorList).each(function(i,item){
        		nameList.push(item.orgName);
        	});
        	if (data.priority == 1) {
        		$("#priorityStr").addClass("ui-accept");
            } else if(data.priority == 2){
            	$("#priorityStr").addClass("ui-warn");
            }else if(data.priority == 3){
            	$("#priorityStr").addClass("ui-stop");
            }
        	$("#receiveOrgNames").html(nameList.join("，"));
        }
    });
	</#if>
});	
</script>
</head>
<body>
	<table class="info-table">
		<tr>
			<td class="info-lable">任务标题</td>
			<td class="info-value" id="title"></td>
		</tr>
		<tr>
			<td class="info-lable">任务类型</td>
			<td class="info-value" id="typeStr"></td>
		</tr>
		<tr>
			<td class="info-lable">优先级</td>
			<td class="info-value" ><span id="priorityStr"></span></td>
		</tr>
		<tr>
			<td class="info-lable">任务接收单位</td>
			<td class="info-value" id="receiveOrgNames">
			</td>
		</tr>
		<tr>
			<td class="info-lable">发布人</td>
			<td class="info-value" id="createName"></td>
		</tr>
		<tr>
			<td class="info-lable">发布单位</td>
			<td class="info-value" id="orgName"></td>
		</tr>
		<tr>
			<td class="info-lable">发布时间</td>
			<td class="info-value" id="createTimeStr"></td>
		</tr>
		<tr>
			<td class="info-lable">说明</td>
			<td class="info-value" id="remark"></td>
		</tr>
		
	</table>


</body>
</html>
